package com.ruiysoft.entity.wechat;

/**
 * Created by 化增光 on 2017/3/7.
 */
public class WXConstant {
    /**
     * JSAPISign
     */
    public final static String REDIS_KEY_ACCESS_TOKEN = "WXLocalBaseSupport:WX_ACCESS_TOKEN";
    public final static String REDIS_KEY_JSAPI_TICKET = "WXLocalBaseSupport:REDIS_KEY_JSAPI_TICKET:";
    public final static String GRANT_TYPE_CLIENT_CREDENTIAL = "grant_type=client_credential";
    public final static String GRANT_TYPE_AUTHORIZATION_CODE = "grant_type=authorization_code";
    public final static String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token";
    public final static String PAGE_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token";
    public final static String JSAPI_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket";
    public final static String PAGE_ACCESS_TOKEN_USER_INFO_URL = "https://api.weixin.qq.com/sns/userinfo";
    public final static String JSAPI_TYPE = "type=jsapi";
    /**
     * 二维码生成
     */
//    public final static String QR_LIMIT_SCENE = "QR_LIMIT_STR_SCENE";
    public final static String QR_CODE_TICKET_URL = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
//    public final static String REDIS_KEY_QR_CODE_TICKET = "WX_QR_CODE_TICKET:";
//    public final static String QR_CODE_URL = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=";

    /**
     * 自定义菜单
     */
    public final static String QUERY_CUSTOM_MENUS_URL = "https://api.weixin.qq.com/cgi-bin/menu/get?access_token=";
    public final static String CREATE_CUSTOM_MENUS_URL = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=";
    public final static String DELETE_CUSTOM_MENUS_URL = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=";

    /**
     * 素材列表
     */
    public final static String QUERY_BACHGET_MATERIAL_URL = "https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=";

    /**
     * 网页授权token
     */
    public final static String WEB_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=";

    //支付回调URL

//    public final static String WX_PAY_NOTIFY_URL = "https://www.yogapro.cn/microshop/api/microprogram/payCallbackConfirm";
//    public final static String WX_PAY_NOTIFY_URL = "https://xcx.ruiysoft.com/xiaocx/payment/receiveCallBack";
    public final static String WX_PAY_NOTIFY_URL = "https://xcx.ruiysoft.com/xiaocx/microprogram/payCallbackConfirm";

    public final static String WX_REFUND_NOTIFY_URL = "https://xcx.ruiysoft.com/xiaocx/microshop/api/microprogram/payRefundConfirm";

    //场景IDkey
    public final static String REDIS_KEY_SCENE_ID = "WX_SCENE_ID:";
    //订单key
    public final static String REDIS_KEY_ORDER_NO = "CARE_ORDER_NO:";

    public final static String CARE_PAY_NOTIFY_URL = "http://www.cnguanai.com/care/insurance/paySuccess";

    //获取微信媒体文件
    public static final String WX_MEDIA_URL = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=";

    // 各种消息类型,除了扫带二维码事件
    /**
     * 文本消息
     */
    public static final String MESSAGE_TEXT = "text";
    /**
     * 图片消息
     */
    public static final String MESSAGE_IMAGE = "image";
    /**
     * 图文消息
     */
    public static final String MESSAGE_NEWS = "news";
    /**
     * 语音消息
     */
    public static final String MESSAGE_VOICE = "voice";
    /**
     * 视频消息
     */
    public static final String MESSAGE_VIDEO = "video";
    /**
     * 小视频消息
     */
    public static final String MESSAGE_SHORTVIDEO = "shortvideo";
    /**
     * 地理位置消息
     */
    public static final String MESSAGE_LOCATION = "location";
    /**
     * 链接消息
     */
    public static final String MESSAGE_LINK = "link";
    /**
     * 事件推送消息
     */
    public static final String MESSAGE_EVENT = "event";
    /**
     *扫描带参数的二维码
     * 用户已关注
     */
    public static final String MESSAGE_EVENT_SCAN = "SCAN";
    /**
     * 事件推送消息中,事件类型，subscribe(订阅)
     */
    public static final String MESSAGE_EVENT_SUBSCRIBE = "subscribe";
    /**
     * 事件推送消息中,事件类型，unsubscribe(取消订阅)
     */
    public static final String MESSAGE_EVENT_UNSUBSCRIBE = "unsubscribe";
    /**
     * 事件推送消息中,上报地理位置事件
     */
    public static final String MESSAGE_EVENT_LOCATION_UP = "LOCATION";
    /**
     * 事件推送消息中,自定义菜单事件,点击菜单拉取消息时的事件推送
     */
    public static final String MESSAGE_EVENT_CLICK = "CLICK";
    /**
     * 事件推送消息中,自定义菜单事件,点击菜单跳转链接时的事件推送
     */
    public static final String MESSAGE_EVENT_VIEW = "VIEW";


    public static final String TEMPLATE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";

    /**
     * 投保成功消息ID
     */
    public static final String TEMPLATE_MESSAGE_ACCEPT_ID = "Q0Qa5IRJ0MkDr3c15eFg8QYkS5oW-z-VQAKZyIRlFfo";

    /**
     * 投保失败消息ID
     */
    public static final String TEMPLATE_MESSAGE_ACCEPT_FAIL_ID = "KayLitu-_dIhcSUZX7HMZig9PrqRFDKWRo07diQIiVs";
    /**
     * 理赔状态变更模板消息id
     */
    public static final String TEMPLATE_MESSAGE_CLAIMS_STATUS_ID = "fAMl5jLHYcMtgAaCrnj-V9MQLlCh2DVbAcHZjLNSoFQ";



    /**
     * 模板消息回掉
     */
    public static final String TEMPLATESENDJOBFINISH_CALLBACK = "TEMPLATESENDJOBFINISH";

    /**
     * 退款地址
     */
    public static final String WX_REFUND_URL = "https://api.mch.weixin.qq.com/secapi/pay/refund";

    /**
     * 商户余额转个人呢微信余额
     */
    public static final String WX_DO_TRANSFER_URL = "https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers";

    /**
     * 统一下单
     */
    public static final String WX_PLACE_AN_ORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";


    /**
     * 自动回复类型
     * 被关注自动回复
     */
    public static final Integer AUTO_REPLY_SUBSCRIBE = 1;

}
